package com.jixiantubu.jinnang;

import image.SmartImageView;
import com.example.jixiantubu.R;
import com.jixiantubu.bean.Sciencebean;
import com.jixiantubu.util.MyApplication;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import android.widget.TextView;

public class JinNang_TuiJian_NeiRongJianJie extends Activity {
	SmartImageView imageView;
	TextView textView;
	Button button;
	Sciencebean sciencebean;
	String url1="http://" + MyApplication.getIP()
			+ ":8080/Jinnang/img/";
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		Window window = this.getWindow();
		window.requestFeature(window.FEATURE_NO_TITLE);
		setContentView(R.layout.jinnang_kepu_neirongjianjie_main);
		initViews();
		initData();
	}

	private void initViews() {
		Intent intent = getIntent();
	    sciencebean = (Sciencebean) intent.getSerializableExtra("id");
		imageView=(SmartImageView) findViewById(R.id.keputuijian_jianjie_tv);
		textView=(TextView) findViewById(R.id.keputuijian_jianjie_neirong_tv);
		button=(Button) findViewById(R.id.keputuijian_jianjie_yuedu_btn);
	}

	private void initData() {
		textView.setText(sciencebean.getS_title());
	    String urtString=url1+sciencebean.getS_photo_jianjie();
	    imageView.setImageUrl(urtString, R.drawable.error, R.drawable.loding);	
	}
	public void jump(View view){
		Intent intent=new Intent(
				JinNang_TuiJian_NeiRongJianJie.this,
				JinNnang_TuiJian_JuTiNeiRong.class);
		intent.putExtra("neirong",sciencebean);
		startActivity(intent);
	}
}
